#include"mystring.h"

uint my_strlen(const char* str)
{
    int cnt=0;
    while((*str)!='\0')
    {
        str++;
        cnt++;
    }
    return cnt;
}

char* my_strcpy(char* dest,const char* src)
{
    char* cur=dest;
    while(*cur=*src)
    {
        cur++;
        src++;
    }
    return dest;
}

int my_strcmp(const char*lhs,const char*rhs)
{
    while(*lhs++==*rhs++)
    {
        if(*lhs=='\0'||*rhs=='\0')
            break;
    }
    return *lhs-*rhs;
}
